//
//  TZL_HomeController.m
//  MyTabbarDemo
//
//  Created by Yuki on 2021/10/11.
//

#import "TZL_HomeController.h"
#import <Masonry.h>
#import "TZL_HomeChildeController.h"
@interface TZL_HomeController ()

@end

@implementation TZL_HomeController
- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    self.tabBarController.tabBar.hidden = NO;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navgationTitle = @"首页";
    self.navView.showBackBtn = NO;
    
    //创建界面
    [self buildUI];
}

/// 构造界面
- (void)buildUI{
    UIView *redView = [UIView new];
    [redView addGestureRecognizer:[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(clickView)]];
    redView.backgroundColor = UIColor.redColor;
    [self.view addSubview:redView];
    [redView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.size.mas_equalTo(CGSizeMake(100, 100));
        make.left.mas_equalTo(12);
        make.top.mas_equalTo(10 + TZL_NavgationHeight());
    }];
}

- (void)clickView{
    TZL_HomeChildeController *vc = [[TZL_HomeChildeController alloc]init];
    [self.navigationController pushViewController:vc animated:YES];
}

@end
